package net.ericaro.neojavagen.blocks;

/**
 * <b>TryStatement</b> ::= <{@link net .ericaro .neojavagen .blocks .TryCatchStatement TryCatchStatement}> <
 * {@link net .ericaro .neojavagen .blocks .TryCatchFinallyStatement TryCatchFinallyStatement}>
 * 
 * @author eric@ericaro.net
 */
public class TryStatement extends net.ericaro.neojavagen.JavaPartComposition implements net.ericaro.neojavagen.blocks.StatementWithoutTrailingSubstatement {
	private net.ericaro.neojavagen.blocks.TryCatchFinallyStatement tryCatchFinallyStatement;

	private net.ericaro.neojavagen.blocks.TryCatchStatement tryCatchStatement;

	public TryStatement(net.ericaro.neojavagen.blocks.TryCatchStatement tryCatchStatement, net.ericaro.neojavagen.blocks.TryCatchFinallyStatement tryCatchFinallyStatement) {
		super();
		this.tryCatchStatement = tryCatchStatement;
		this.tryCatchFinallyStatement = tryCatchFinallyStatement;
	}

	public net.ericaro.neojavagen.blocks.TryCatchFinallyStatement getTryCatchFinallyStatement() {
		return tryCatchFinallyStatement;
	}

	public net.ericaro.neojavagen.blocks.TryCatchStatement getTryCatchStatement() {
		return tryCatchStatement;
	}

	public void setTryCatchFinallyStatement(net.ericaro.neojavagen.blocks.TryCatchFinallyStatement tryCatchFinallyStatement) {
		this.tryCatchFinallyStatement = tryCatchFinallyStatement;
	}

	public void setTryCatchStatement(net.ericaro.neojavagen.blocks.TryCatchStatement tryCatchStatement) {
		this.tryCatchStatement = tryCatchStatement;
	}

	@Override
	public java.lang.String toString() {
		return print(tryCatchStatement, tryCatchFinallyStatement);
	}
}
